# model

# determine the open storage-connections for the current user and close (delete) all of them from 'OctopusCloudDatabase' (internal storage)

from google.appengine.ext import webapp

from Utilities import *

class DeleteAllCredentials(webapp.RequestHandler):
    def post(self):
        utilities = Utilities()
        
        # get some basic attributes
        username = utilities.getUsername()
        
        if username:
            # check for existing credentials and delete them
            utilities.deleteAllCredentials(username)
            
            # when it's done - redirect to the previous page
            self.redirect('/regions')
        else:
            self.redirect('/')
             
        
        